package com.google.gwt.sample.dynatablerf.client.events;

import java.util.Set;

import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.sample.dynatablerf.shared.MaterialProjetoProxy;
import com.google.gwt.sample.dynatablerf.shared.ProjetoProxy;

public class MaterialSelectionChangeEvent extends
		GwtEvent<MaterialSelectionChangeEventHandler> {

	public static Type<MaterialSelectionChangeEventHandler> TYPE = new Type<MaterialSelectionChangeEventHandler>();
	
	private Set<MaterialProjetoProxy> materialProjetoProxySet;
	private ProjetoProxy projetoProxy;
 	
	public MaterialSelectionChangeEvent(Set<MaterialProjetoProxy> materialProjetoProxySet, ProjetoProxy projetoProxy) {
		super();
		this.materialProjetoProxySet = materialProjetoProxySet;
		this.projetoProxy = projetoProxy;
	}

	@Override
	protected void dispatch(MaterialSelectionChangeEventHandler handler) {

		handler.onMaterialSelectionChange(this);
	}

	@Override
	public Type<MaterialSelectionChangeEventHandler> getAssociatedType() {

		return TYPE;
	}

	public Set<MaterialProjetoProxy> getMaterialProjetoProxySet() {
		return materialProjetoProxySet;
	}

	public void setMaterialProjetoProxySet(
			Set<MaterialProjetoProxy> materialProjetoProxySet) {
		this.materialProjetoProxySet = materialProjetoProxySet;
	}

	public ProjetoProxy getProjetoProxy() {
		return projetoProxy;
	}

	public void setProjetoProxy(ProjetoProxy projetoProxy) {
		this.projetoProxy = projetoProxy;
	}

}